<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>基于第三方动画类库的CSS动画效果</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.40/vue.global.js"></script>
    <link
      href="https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.min.css"
      rel="stylesheet"
    />
  </head>

  <body>
    <div id="app">
      <button @click="show = !show">切换动画</button>
      <transition
        enter-active-class="animate__animated animate__bounceInRight"
        leave-active-class="animate__animated animate__bounceOutRight"
      >
        <div v-if="show">Hello Vue3!</div>
      </transition>
    </div>

    <script>
      const { createApp } = Vue

      createApp({
        data() {
          return {
            show: false,
          }
        },
      }).mount('#app')
    </script>
  </body>
</html>
